@extends('/layout/index')
 
@section('main')
 
<div class="mws-panel grid_8">
  <div class="mws-panel-header">
    <span>
      <i class="icon-table"></i>订单管理</span>
  </div>
  <!-- 订单状况 -->
   <div class="wizard-nav wizard-nav-horizontal">
        <ul>
          <li data-wzd-id="wzd_1at666bgd3hf339oqo_0" class="current">
           <a href="/Admin/order/index"><span> <i class="icol32-tux"></i>全部订单
   
          </span></a>
          </li>
          <li data-wzd-id="wzd_1at666bgd3hf339oqo_1">
            <a href="/Admin/order/index0"><span> <i class="icol32-money-bag"></i>未付款</span></a>
          </li>
           <li data-wzd-id="wzd_1at666bgd3hf339oqo_1">
           <a href="/Admin/order/index1"><span> <i class="icol32-share"></i>未发货</span></a>
          </li>
           <li data-wzd-id="wzd_1at666bgd3hf339oqo_1">
             <a href="/Admin/order/index2"><span> <i class="icol-delivery"></i>已发货</span></a>
          </li>
            <li data-wzd-id="wzd_1at666bgd3hf339oqo_1">
            <a href="/Admin/order/index6"><span> <i class="icol32-small-business"></i>已完成</span></a>
          </li>

          <li data-wzd-id="wzd_1at666bgd3hf339oqo_2">
            <a href="/Admin/order/index5"><span> <i class="icol32-page-white-tux"></i>已关闭</span></a>
          </li>
        </ul>
        <button type="button" class="btn responsive-prev-btn" disabled="disabled">
          <i class="icon-caret-left"></i>
        </button>
        <button type="button" class="btn responsive-next-btn">
          <i class="icon-caret-right"></i>
        </button>
      </div>

  <!-- 订单状况 -->
  <div class="mws-panel-body no-padding">
    <div role="grid" class="dataTables_wrapper" id="DataTables_Table_1_wrapper">
     
  <form action ="/Admin/order/index" method="get">
      <div id="DataTables_Table_1_length" class="dataTables_length">
        <label>显示
          <select name="num" size="1" aria-controls="DataTables_Table_1">
            <option value="10" 
          @if(!empty($request['num'])&&$request['num']==10)
          selected
          @endif 
       >10</option>
            <option value="15"
      @if(!empty($request['num'])&&$request['num']==15)
          selected
          @endif 

            >15</option>
            <option value="20"
      @if(!empty($request['num'])&&$request['num']==20)
          selected
          @endif 

            >20</option>
            <option value="30"
            @if(!empty($request['num'])&&$request['num']==30)
          selected
      @endif 

        >30</option></select>页</label>
      </div>
     
       <div id="DataTables_Table_1_length" class="dataTables_length">
        <label> &nbsp;&nbsp;  {{$arr['name']}} : {{$arr['m']}}
        </label>
      </div>
     <div class="dataTables_filter" id="DataTables_Table_1_filter">
    
        <label>
          <input type="text" name ="search" value="{{$request['search'] or ''}}" aria-controls="DataTables_Table_1"></label>
        <button class='btn btn-info'> 点击搜索 </button>
       </div>
      </form>


      <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info">
        <thead>
          <tr role="row">
             <th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 6px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">订单号</th>
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 35px;" aria-label="Browser: activate to sort column ascending">商品名称</th>
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 25px;" aria-label="Browser: activate to sort column ascending">商品图片</th>
             <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 25px;" aria-label="Browser: activate to sort column ascending">商品价格</th>
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 35px;" aria-label="Browser: activate to sort column ascending">下单数量</th>
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 32px;" aria-label="Browser: activate to sort column ascending">订单状态</th>
           <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width:30px;" aria-label="CSS grade: activate to sort column ascending">操作</th></tr>

    </thead>
        <tbody role="alert" aria-live="polite" aria-relevant="all">
         @if(isset($row))
         @foreach($row as $k =>$v)
         <th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" 
                  style="width: 6px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">
          {{$v->ordernum}}</th>
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" 
                  style="width: 55px;" aria-label="Browser: activate to sort column ascending">
            {{$v->goodsname}}</th>
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" 
                  style="width: 35px;" aria-label="Browser: activate to sort column ascending">
            
             
              <img src="{{$v->goodspic}}" style="height:60px" width="100%">
            </th>
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1"
                style="width: 35px;" aria-label="Browser: activate to sort column ascending">
            {{$v->orderprice}}
            </th> 
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" 
                style="width: 35px;" aria-label="Browser: activate to sort column ascending">
            {{$v->num}}</th>
           
      
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" 
            style="width: 32px;" aria-label="Browser: activate to sort column ascending">
             @if($v->status == 6) 
                交易成功
            @elseif($v->status == 5)
                交易关闭
              @elseif($v->status == 4)
                未评价
              @elseif($v->status == 3)
                已签收
              @elseif($v->status == 2)
                已发货
              @elseif($v->status == 1)
                未发货
               @elseif($v->status == 0)
               未付款
              @endif
              <!--  {{$v->status}} -->

            </th>
           <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" 
           style="width:60px;" aria-label="CSS grade: activate to sort column ascending">
            <center>   
              <div id ="par">          
              <a href="/Admin/order/delete?id={{$v->id}}" onclick ="shopping({{$v->id}})"  style="color:black">删除订单</a><br/>  
               
              <a href="/Admin/order/detail?id={{$v->id}}" class="look"  style="color:black">查看详情 </a><br/>
              </div>
             <div class="mws-stat-container clearfix" class="detail" style="display:none;">
               <!-- Statistic Item -->
                  <a href="#" class="mws-stat">
                      <!-- Statistic Icon (edit to change icon) -->
                      <span class="mws-stat-icon icol32-building"></span>
                        
                        <!-- Statistic Content -->
                        <span class="mws-stat-content">
                          <span class="mws-stat-title">留言</span>
                          <span class="mws-stat-value"></span>
                        </span>


                    </a>          
               </div>
              </center> 
           </th></tr>

      @endforeach
      @else
   
 

      @endif
        </tbody>
      </table>
      <script src="/back/js/libs/jquery-1.8.3.min.js">

     </script>
      <script type="text/javascript">
    

        </script>

      <div class="dataTables_info" id="DataTables_Table_1_info">显示分页</div>
      <div class="dataTables_paginate paging_full_numbers" id="page">
        {!! $row->appends($request)->render() !!}
       </div>

  </div>
</div>


@endsection
